from machine import Pin, PWM
import time

back = 1000000
standby = 1500000
pwm0 = PWM(Pin(0))
pwm0.freq(50)
pwm0.duty_ns(1500000)
time.sleep(3)

for i in range(0, 51):
    pwm0.duty_ns(1500000 + 10000 * i)
    print(1500000 + 10000 * i)
    time.sleep(0.1)
pwm0.duty_ns(2000000)
print(pwm0.duty_ns())
time.sleep(120)
pwm0.duty_ns(1500000)
time.sleep(1)
pwm0.deinit()

